package cn.zhx.infrastructure.persistent.dao;

import cn.zhx.domain.strategy.model.entity.StrategyAwardEntity;
import cn.zhx.infrastructure.persistent.po.StrategyAward;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;


@Mapper
public interface StrategyAwardDao {
    List<StrategyAward> queryStrategyAwardByStrategyId(Long strategyId);

    String queryStrategyAwardRuleModels(StrategyAward strategyAward);

    /**
     * 更新库存 -1
     * @param strategyAward 奖品信息
     */
    void updateStrategyAwardStock(StrategyAward strategyAward);

    StrategyAward queryStrategyAward(StrategyAward strategyAward);

    void clearStrategyAwardStock(Long strategyId, Integer awardId);
}
